<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="FCK" uri="http://java.fckeditor.net" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="${website}resource/admin/css/admin.css" type="text/css" />
<script type="text/javascript" src="${website}resource/js/common_min.js"></script>
<script type="text/javascript">
	function changePre(value){
				document.getElementById("preImageUrl").src = value;
			}
	$(document).ready(function(){
		//初始化cityName；
		$("#cityName").attr("value",$("#cityId").find('option:selected').text());
		//城市下拉框值改变时，cityName相应改变
		$("#cityId").change(function(){
			$("#cityName").attr("value",$("#cityId").find('option:selected').text());
		});
	});
</script>
<title>添加城市信息</title>
</head>
<body>
<div class="currentPosition"><img src="${staticWebsite}admin/images/tb.gif"/>添加城市基本信息</div>
	<form action="${website}admin/city_addBasicInfo.action" method="post" enctype="multipart/form-data">
	<table class="commonTable">
		<tr>
			<td width="15%" class="commonName">城市名称</td>
			<td><select id="cityId" name="cityInfo.cityId">
				<c:forEach var="otherCity" items="${otherCityList}">
					<option value="${otherCity.cityId}">${otherCity.cityName}</option>
				</c:forEach>
			</select>
			<input type="hidden" id="cityName" name="cityInfo.cityName"/>
			</td>
		</tr>
		<tr>
			<td class="commonName">城市简介</td>
			<td><textarea rows="4" cols="110" name="cityInfo.simpleDescription"></textarea> </td>
		</tr>
		
		<tr>
			<td class="commonName">城市概览</td>
			<td><FCK:editor instanceName="cityInfo.overview"></FCK:editor></td>
		</tr>
		<tr>
			<td class="commonName">城市印象</td>
			<td><FCK:editor instanceName="cityInfo.impression"></FCK:editor></td>
		</tr>
		
		<tr>
			<td class="commonName">城市美景</td>
			<td><textarea cols="110" rows="4" name="cityInfo.scenicDescription"></textarea></td>
		</tr>
		
		<tr>
			<td class="commonName">城市美食</td>
			<td><textarea cols="110" rows="4" name="cityInfo.foodDescription"></textarea></td>
		</tr>
		
		<tr>
			<td class="commonName">城市特产</td>
			<td><textarea cols="110" rows="4" name="cityInfo.specialtyDescription"></textarea></td>
		</tr>
		
		<tr>
			<td class="commonName">城市图片</td>
			<td><input type="file" name="imageUrl" onpropertychange="changePre(this.value)"/>
			<img id="preImageUrl" src="" />
			</td>
		</tr>
		<tr>
			<td colspan="2"><input type="submit" value="提交" /></td>
		</tr>
	</table>
	</form>
</body>
</html>